package com.jdrx.sw.sewage.beans.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

@ApiModel(value = "AlarmPO", description = "告警")
@Data
public class AlarmPO implements Serializable {
    private static final long serialVersionUID = -1206960462117924923L;

    @NotNull
    @Range(min = 1)
    @ApiModelProperty(value = "id主键", required = true)
    private Long id;

    @ApiModelProperty(value = "站点id", required = true)
    private Long stationId;

    @ApiModelProperty(value = "站点名称", required = true)
    private String stationName;

    @ApiModelProperty(value = "告警状态(0-未处理 1-处理中 2-已完成)", required = true)
    private Integer alarmStatus;

    @ApiModelProperty(value = "告警类型(对应字典表id)", required = true)
    private Long alarmType;

    @ApiModelProperty(value = "告警类型名称", required = true)
    private String alarmTypeName;

    @ApiModelProperty(value = "告警信息", required = true)
    private String alarmInfo;

    @ApiModelProperty(value = "告警级别(1-黄色告警 2-红色告警)", required = true)
    private Integer alarmLevel;

    @ApiModelProperty(value = "告警开始时间", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime startTime;

    @ApiModelProperty(value = "告警结束时间", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "责任人名字  张三,李四")
    private String dutyUserNames;

    @ApiModelProperty(value = "故障编号(例如SB2001010001)", required = true)
    private String alarmNum;

    @ApiModelProperty(value = "设备ID", required = true)
    private Long deviceId;

    @ApiModelProperty(value = "租户id")
    private String dataNode;

    @ApiModelProperty(value = "设备类型(1 - 设备  2-厂站)", required = true)
    private Integer devType;

    @ApiModelProperty(value = "采集设备点位id", required = true)
    private Long gatherDevPoiId;

    @ApiModelProperty(value = "网关编号", required = true)
    private String iotGatewayNum;
}